﻿using System.IO;
using System.Threading.Tasks;
using System.Web.Mvc;
using SDCloudSolution.SDCloud.Entities.Models;
using SDCloudSolution.SDCloud.Web.Models;
using SDCloudSolution.SDCloud.Web.Models.Model;

namespace SDCloudSolution.SDCloud.Web.Infrastructure.Interfaces
{
    public interface IModelViewModelProvider
    {
        Task<ModelListViewModel> GetPublicModelsListViewModelAsync(PagingModel paging);

        Task<int> CopyPublicModelToPrivateCollection(int publicModelId);

        Task<ModelListViewModel> GetModelsListViewModelAsync(PagingModel paging);

        Task<Stream> GetModelFileStreamAsync(int modelId);

        Task<ModelEditViewModel> GetModelEditViewModelAsync(int modelId = 0);

        void ValidateModelUploadedFile(ModelEditViewModel editViewModel, ModelStateDictionary modelState);

        Task<ModelViewModel> GetModelViewModelAsync(int modelId);

        Task<ModelViewModel> GetPublicModelViewModelAsync(int publicModelId);

        Task<ModelEntity> SaveAsync(ModelEditViewModel editViewModel);

        Task DeleteAsync(int modelId);
    }
}
